package nc.appcan.bill.vo;

import java.util.HashMap;
import java.util.Map;

public class SaleOrderAggVO {
	private SaleOrderHeadVO head;
	private SaleOrderItemVO[] body;

	public SaleOrderHeadVO getHead() {
		return head;
	}
	public void setHead(SaleOrderHeadVO head) {
		this.head = head;
	}
	public SaleOrderItemVO[] getBody() {
		return body;
	}
	public void setBody(SaleOrderItemVO[] body) {
		this.body = body;
	}
	public String getCodes(){
		StringBuffer st = new StringBuffer();
		for(SaleOrderItemVO itemvo:this.body){
			st.append("'").append(itemvo.getTranferid()).append("'").append(",");
		}
		return st.substring(0, st.length()-1);
	}
	public Map<String ,SaleOrderItemVO> getBodyMap(){
		Map<String ,SaleOrderItemVO>  map = new HashMap<String,SaleOrderItemVO>();
		for(SaleOrderItemVO itemvo:this.body){
			map.put(itemvo.getTranferid(), itemvo);
		}
		return map;
	}
	

}
